const mongoose = require('mongoose');
const Schema = mongoose.Schema;

let commentSchema = new Schema({
  doubanId: String, // 文件保存路径
  from: String, // 文件名称
  star: Number, // 星星的个数
  content: String, // 评论的内容
  title: String, // 评论的标题
  name: String, // 电影的名字
  zan: {
    _id: 0,
    count: {
      type: Number,
      default: 0
    },
    users: [String]
  },
  noZan: {
    _id: 0,
    count: {
      type: Number,
      default: 0
    },
    users: [String]
  }
}, {versionKey: false, timestamps: true});
module.exports = mongoose.model('comment', commentSchema)
;
